﻿@model AccountFlow.Controllers.ScoreSheet
@{
    ViewBag.Title = "Score";
    Layout = "~/Views/Shared/_FullLayout.cshtml";
}
<style>
    table {
        width: 100%;
    }

        table th {
            border: 1px solid #555;
            padding: 10px;
        }

        table td {
            border: 1px solid #999;
            padding: 10px;
        }
</style>
<h2>ScoreSheet For Klout </h2>

@if (ViewBag.Error == null)
{

    <table>

        @foreach (var p in Model.Personalies)
        {       
            <tr>
                <td style="width: 100%; background-color: aliceblue; margin: 10px;">
                    <h2>@p.Name </h2>

                </td>
            </tr>
            <tr>
                <td>
                    <table>
                        <tr>
                            <th>Provider
                           <br />
                                Score
                            </th>
                            <th>Log Data</th>
                        </tr>
                        @foreach (var web in p.Providers)
                        {
                            <tr valign="top">
                                <td style="width: 50px;">
                                    @web.ProviderName
                                    <br />
                                    @web.Score
                                </td>
                                <td>


                                    @{
                            Dictionary<string, string> buffer = (Dictionary<string, string>)web.Data;
                            if (buffer != null)
                            {
                                        <table>
                                            <tr>

                                                <th>URL : JSON</th>
                                            </tr>
                                            @foreach (var kp in buffer)
                                            {
                                                <tr>
                                                    <td style="overflow:  hidden">
                                                        <h3 style="background-color: azure">
                                                            @kp.Key
                                                        </h3>
                                                        <hr />
                                                        <div class="json" style="border: 1px dashed #ababab; padding: 10px;">
                                                            @kp.Value
                                                        </div>

                                                    </td>
                                                </tr>
                                            }
                                        </table>
                            }
                                    }

                                </td>
                            </tr>
                        }
                    </table>
                </td>
            </tr>
        }

    </table>
}
else
{
    <div>
        <h1>Error</h1>
        <hr />
        @ViewBag.Error
    </div>
}

